import request from "@/utils/request";

export function getData(params) {
  return request({
    url: "/mall/suit/list",
    method: "get",
    params
  });
}
// 获取风格标签
export function getStyleData() {
  return request({
    url: "/mall/product-style/allShow",
    method: "get"
  });
}

// 获取所有单品
export function getAllItemData() {
  return request({
    url: "/mall/product/all",
    method: "get",
    params: { top_cate_id: 7 }
  });
}

// 获取商品详情
export function getDetailData(id) {
  return request({
    url: "/mall/suit/detail",
    method: "get",
    params: { id }
  });
}

// 添加商品
export function postData(data) {
  return request({
    url: "/mall/suit/add",
    method: "post",
    data
  });
}

// 编辑商品
export function postEditData(data) {
  return request({
    url: "/mall/suit/edit",
    method: "put",
    data
  });
}

// 赠送
export function postSendData(data) {
  return request({
    url: "/mall/product/give",
    method: "post",
    data
  });
}

export function deleteData(ids) {
  return request({
    url: "/mall/suit/del",
    method: "delete",
    data: { ids }
  });
}
